<!DOCTYPE html >
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">-->
<!--    <meta name="description" content="">-->
<!--    <meta name="author" content="">-->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <link th:href="@{/css/login.css}" rel="stylesheet" />
<title>高校运动会后台管理系统-登录系统</title>

</head>

<body>
<div class="login_box">
      <div class="login_l_img"><img th:src="@{/img/timg.png}" /></div>
      <div class="login">
          <div class="login_logo"><a href="#"><img th:src="@{/img/login_logo.png}" /></a></div>
          <div class="login_name">
               <p>运动会管理系统</p>

              <!--如果msg不为空，则显示-->
              <div  style="color: red;float: outside" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}" ></div>
          </div>
          <form method="post" class="form-horizontal" th:action="@{/login}">
              <input name="id" id="id" type="text" placeholder="请输入用户名" th:value="${id}" style="height: 40px">
              <input name="password" type="password" id="password" placeholder="请输入密码" th:value="${password}" style="height: 40px"/>

              <div class="form-group">
                  <label  class="col-sm-4 control-label">账号类型：</label>
                  <div class="col-sm-8">
                      <div th:if="${userType==null||userType=='1'}">
                          <label class="radio-inline">
                              <input type="radio" name="userType" id="rdoAdmin" value="1" checked="checked"> 管理员
                          </label>
                          <label class="radio-inline">
                              <input type="radio" name="userType" id="rdoStu" value="2">学生
                          </label>
                      </div>
                      <div th:if="${userType=='2'}">
                          <label class="radio-inline">
                              <input type="radio" name="userType" id="rdoAdmin" value="1" > 管理员
                          </label>
                          <label class="radio-inline">
                              <input type="radio" name="userType" id="rdoStu" value="2" checked="checked">学生
                          </label>
                      </div>
                  </div>
              </div>

              <div class="form-group">
<!--                  <label class="col-md-3  control-label">验证码:</label>-->
                  <div class="col-md-7">
                      <input type="text" class="form-control" id="code" name="code" style="height: 40px" required placeholder="请输入验证码">
                  </div>
                  <div class="col-md-5">
                      <img alt="验证码" onclick = "this.src='/getCode?d='+new Date()*1" src="/getCode" />
                  </div>
              </div>

              <input value="登录" type="submit"/>
          </form>
      </div>
      <div class="copyright">广州理工学院2021年春季运动会</div>
</div>
</body>
</html>
